<?php
/**
 * 消息模板
 * Created by PhpStorm.
 * User: yangxiaolin
 * Date: 2017/4/26
 * Time: 15:07
 */

namespace App\Services;


use Illuminate\Support\Facades\Config;

trait OfflineServices
{
    use BaseServices;
    /**
     * pad增加用户下发
     *
     * @param $data  [park_code,start_time,end_time,msgno,msg,mode]
     * @return json
     */
    public function sendIssueUser($data)
    {
        $res = curl_post(config('custom.car_auth_api_url')."/pad_account_add?src=airport",$data);
        return $this->reData($res);
    }

    /**
     * 修改用户下发
     *
     * @param $data  [park_code,start_time,end_time,msgno,msg,mode]
     * @return json
     */
    public function editIssueUser($data)
    {
        $res = curl_post(config('custom.car_auth_api_url')."/pad_account_modify?src=airport",$data);
        return $this->reData($res);
    }

    /**
     * 修改"周期时段"消息
     *
     * @param $data  [park_code,period,msgno,msg,mode]
     * @return json
     */
    public function deleteIssueUser($data)
    {
        $res = curl_post(config('custom.car_auth_api_url')."/pad_account_del?src=airport",$data);
        return $this->reData($res);
    }
}